﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Avatar.Company;
using System.Web.Security;
using Avatar.Common;

public partial class UserControl_Company_BasicInformation : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            var _user=Membership.GetUser();
            if (_user != null)
            {
                var _companyInformation = CompanyInformationManager.GetCompanyInformation(_user.UserName);
                if (_companyInformation != null)
                {
                    lbl_CompanyName.Text = _companyInformation.CompanyName;
                    img_Logo.ImageUrl = string.IsNullOrEmpty(_companyInformation.Logo) ? "~/Images/NoCompanyLogo.gif" : _companyInformation.Logo;
                }
                else
                {
                    //Helper.ShowMassage("您的企业基本资料尚未填写，接下来请填写您企业的基本资料。", "CompanyInformation.aspx");
                }
            }
        }
    }
}
